﻿using HttpApiGateway.FileUp.Interface;
using HttpApiGateway.FileUp.Model;
using HttpService.Interface;
using RpcModular;

namespace HttpApiGateway.Interface
{
    [RpcClient.Attr.IgnoreIoc]
    public interface IUpBlockFileController<T>
    {
        /// <summary>
        /// 文件
        /// </summary>
        UpFileDatum<T> File { get; }
        /// <summary>
        /// 服务名
        /// </summary>
        string ServiceName { get; }

        /// <summary>
        /// 用户状态
        /// </summary>
        IUserState UserState { get; }

        /// <summary>
        /// 请求
        /// </summary>
        IHttpRequest Request
        {
            get;
        }
       
        /// <summary>
        /// 准备上传任务
        /// </summary>
        void InitUp(IUpTask task);
        /// <summary>
        /// 上传完成
        /// </summary>
        /// <param name="result"></param>
        void Complate(IUpFileResult result);
    }
    [RpcClient.Attr.IgnoreIoc]
    public interface IUpBlockFileController
    {
        /// <summary>
        /// 文件
        /// </summary>
        UpFileData File { get; }
        /// <summary>
        /// 服务名
        /// </summary>
        string ServiceName { get; }

        /// <summary>
        /// 用户状态
        /// </summary>
        IUserState UserState { get; }

        /// <summary>
        /// 请求
        /// </summary>
        IHttpRequest Request
        {
            get;
        }

        /// <summary>
        /// 准备上传任务
        /// </summary>
        void InitUp(IUpTask task);
        /// <summary>
        /// 上传完成
        /// </summary>
        /// <param name="result"></param>
        void Complate(IUpFileResult result);
    }
}
